#@layoutT("修改密码")
#define main()
	<form action="#(path)/portal/core/sysUser/updateMypassword" class="layui-form" method="post" autocomplete="off" onsubmit="return checkPassword()">
		<input type="hidden" name="userCode" value="#(userCode)"/>
		#(token)
		<div class="layui-row layui-col-space1 task-row">
			#@colStart('原密码',12)
			<input type="password" class="layui-input" name="oldPassword" value="" 
			lay-verType='tips' lay-verify="required|" required maxlength="50"  placeHolder="长度最大50"
			/>		
			#@colEnd()
			#@colStart('新密码',12)
			<input type="password" class="layui-input" name="newPassword" value="" 
			lay-verType='tips' lay-verify="required|" required maxlength="50"  placeHolder="长度最大50"
			/>		
			#@colEnd()
			#@colStart('确认新密码',12)
			<input type="password" class="layui-input" name="newPassword1" value="" 
			lay-verType='tips'lay-verify="required|" required maxlength="50"  placeHolder="长度最大50"
			/>		
			#@colEnd()
		</div>

		<div class="layui-row layui-col-space1 task-row">				
				<div class="layui-col-xs12 layui-col-sm12 layui-col-md8">
					<div class="layui-input-block">
							<div class="layui-btn-container" style="margin-top: 10px;margin-left:25px">
								<button id='1cdfb502t_589' type="submit" lay-submit	 class='layui-btn  layui-btn-normal '  value="Submit">
									<i class="layui-icon">&#xe605;</i>	提交
								</button>
								<button id='closeWinBtn' type="button" 	 class='layui-btn  layui-btn-normal  layui-btn-radius' value="Close">
									<i class="layui-icon">&#x1006;</i>	关闭
								</button>
							</div>
					</div>
				</div>
			</div>
	</form>
#end
#define js()
<!-- 加密处理 -->
<script src="#(path)/static/pub/login/rsa/RSA_Stripped.js" type="text/javascript"></script>
<script src="#(path)/static/pub/login/rsa/BigInt.js" type="text/javascript"></script>
<script src="#(path)/static/pub/login/rsa/Barrett.js" type="text/javascript"></script>
<script type="text/javascript">
function checkPassword(){
	var oldPassword=$("input[name=oldPassword]").val();
   var newpassword=$("input[name=newPassword]").val();
   var newpassword1=$("input[name=newPassword1]").val();
   if(newpassword!=newpassword1){
	layer.msg("确认新密码与新密码不一致");
	return false;
  }
   
   bodyRSA();
   oldPassword = encryptedString(key, encodeURIComponent(oldPassword));
   newpassword = encryptedString(key, encodeURIComponent(newpassword));
   $("input[name=oldPassword]").val(oldPassword);
   $("input[name=newPassword]").val(newpassword);
   $("input[name=newPassword1]").val(newpassword);
   return true;
}

//加密key,不要改变下面的方法值
var key ; 
function bodyRSA(){
    setMaxDigits(130);
    key = new RSAKeyPair("10001","","dff46645b6337855b0c1f9812a1a943904f2abd5f2f339f0f3b7f81cdb169eab00da0321a0075ef1d9e12d2af4d168b16d0f3ded064f8bcb97ca2af891eb73a0b55a2990b62fffc0cee0e61efcf5ec6247c8eb4a1f4df6d2ac42d930407c52c6e8cd07f6babf109c50428c3d8f1a64a66950178197136ee19b04b2bdf6dcb3df");
}
</script>

#end
  